
<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1.0">
      
		<title>账号登陆</title>
		<link rel="stylesheet" href="/css/login.css">
		<link href="https://cdn.bootcss.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
        <link href="https://cdn.bootcss.com/bootstrap/3.1.1/css/bootstrap-theme.min.css" rel="stylesheet">
    	<script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
     </head>
	<body>
		<div class="main">
			<div class="header">
				<!-- <p>后台管理系统</p> -->
			</div>
			<div class="content">
				<div class="title">账号登陆</div>
	
        <?php echo form_open('user/login'); ?>
     			<div class="input">
						<input placeholder="用户名" type="text" name="username" />
					</div>
					<div class="input">
						<input type="password" placeholder="密码" name="password" />
					</div>
					<div class="error">
						<p>
	    <?php echo validation_errors(); ?>
	</p>
					</div>
					<div class="enter">
						<input type="submit" value="登&nbsp;&nbsp;录" name="submit" />
					</div>
					<!-- <div class="checkbox">
						<input type="checkbox" />
						<label for="remember"><span>记住密码</span></label>
						<a href="">忘记密码？</a>
					</div>		 -->
				</form>
			</div>
		</div>
		<script>
			$(window).resize(function(){
				var screenWidth = $(window).width() ;
				if ( screenWidth < 768 ) {
					$(".header").hide();
					var screenHeight = $(window).height();
					$("body").width( screenWidth );
					$("body").height( screenHeight );
					$(".content").css({
						marginTop : screenHeight/2 - 430/2+"px",
						marginLeft: screenWidth/2 - 420/2 +"px"
					});
				}else{
					$(".header").show();
					$(".header").css("marginLeft", screenWidth/2 - 550/2 +"px");
					$(".content").css({
						marginTop : screenHeight/2 - 430/2+"px",
						marginLeft: screenWidth/2 - 420/2 +"px"
					});
				}
			});
			$(window).resize();

			if (navigator.userAgent.match(/mobile/i)  && !navigator.userAgent.match(/pad/i) ) {
			    $("body").css("background","none");
			}

		</script>
	</body>
</html>

